//
//  JGChangeHeadPictureAlertView.m
//  JGRider
//
//  Created by 单启志 on 2018/2/1.
//  Copyright © 2018年 ffq. All rights reserved.
//

#import "JGChangeHeadPictureAlertView.h"
#import "WJYAlertView.h"
@implementation JGChangeHeadPictureAlertView

-(instancetype)initWithFrame:(CGRect)frame{

    if (self=[super initWithFrame:frame]) {
        self=[[[NSBundle mainBundle]loadNibNamed:NSStringFromClass([self class]) owner:nil options:nil]lastObject];
        self.frame=frame;
    }
    return self;

}

#pragma mark event response
//关闭
- (IBAction)onCloseBtnClick:(id)sender {
    if ([self.delegate respondsToSelector:@selector(headPictureAlertViewCloseEvent)]) {
        [self.delegate headPictureAlertViewCloseEvent];
    }
}

//相册
- (IBAction)onPhotoBtnClick:(id)sender {
    if ([self.delegate respondsToSelector:@selector(headPictureAlertViewPhotoEvent)]) {
        [self.delegate headPictureAlertViewPhotoEvent];
    }
}

//拍照
- (IBAction)onCameraBtnClick:(id)sender {
    if ([self.delegate respondsToSelector:@selector(headPictureAlertViewCameraEvent)]) {
        [self.delegate headPictureAlertViewCameraEvent];
    }
}

-(void)layoutSubviews{
    [super layoutSubviews];
    self.layer.cornerRadius=5;
    self.layer.masksToBounds=YES;

}

@end
